package com.hpf.cloud.utils;

import com.baomidou.mybatisplus.core.toolkit.AES;

/**
 * @description: 数据库加密类
 * @datetime: 2020/12/5 15:55
 * @author: huangpengfei
 */
public class DataBaseEncrypt {

    /**
     * 生成 16 位随机 AES 密钥
     */
    private static final String RANDOM_KEY = "b662457a27f9da09";

    public static void main(String[] args){
        // 随机密钥加密
        String result = AES.encrypt("jdbc:mysql://127.0.0.1:3306/cloud?useSSL=false&serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8", RANDOM_KEY);
        System.out.println(result);
    }
}
